<?php

namespace app\backend\controller;

use app\backend\service\DutyService;

class Duty extends Backend
{
    /**
     * 签到统计
     * @param DutyService $service
     * @return string|\think\response\Json
     */
    public function index(DutyService $service)
    {
        if ($this->request->isAjax()) {
            $data = $service->lists($this->request->param());
            return $this->success($data);
        }
        return $this->fetch();
    }
}